<?php
namespace BoxMall\Logic;
class IndexLogic extends \LogicController {
	public function index() {
		echo "mall Logic";
	}

	public function getPayType() {
		$is_mobile = mobile();
		if ($is_mobile) {
			$Agent = checkAgent();
			if ($Agent) {
				$type = "'Wapalipay','Wxpay'";
			} else {
				$type = "'Wapalipay','Waptenpay'";
			}

		} else {
			$type = "'Wxpay','Alipay'";
		}

		$list = BoxModel("system_payment")->get("enabled=1 and state=1 and payment_code in ($type)");
		//dump($list);
		return $list;
	}

}